package com.sleep.psy.external_server.result;

public enum ResultEnum {

    //这里是可以自己定义的，方便与前端交互即可
    UNKNOWN_ERROR(-1,"未知错误"),
    SUCCESS(0,"成功"),
    SERVER_INTERNAL_ERROR(500,"服务器内部错误"),
    RESOURCE_NOT_FOUND(404,"资源未找到"),
    PARAMETER_NOT_VALID(400,"参数不合法"),
    NETWORK_ANOMALY(900,"网络异常"),

    USER_EXIST(10001,"用户已经存在"),
    USER_NOT_EXIST(10002,"用户不存在"),
    USER_ENTERPRISE_EXIST(10003,"企业用户已经存在"),
    USER_CATEGORY_EXIST(10004,"用户类别已经存在"),
    USER_NAME_NOT_NULL(10005,"用户名不能为空"),
    USER_PASSWORD_NOT_NULL(10006,"密码不能为空"),
    USER_PASSWORD_ERROR(10007,"用户名或密码错误"),
    USER_VERIFICATION_CODE_ERROR(10008,"验证码错误"),
    USER_PHONE_WRONG(10009,"手机号有误"),
    USER_PHONE_NOT_NULL(10010,"手机号不能为空"),
    USER_STATUS_ERROR(10011, "您好!您的账号已失效，请联系管理员"),
    NO_EVALUATION_RECORD(10031, "测评记录不存在"),
    NO_EVALUATION_REPORT(10032, "测评报告不存在"),
    NOT_HAVE_RECORD(10034, "没有调节方案"),
    NOT_SCHEME(10035, "未查询到方案"),
    SCHEME_STATUS_0(10036, "方案不可用"),
    NO_START_DATE(10037, "方案还未到开始时间"),
    NO_END_DATE(10038, "方案已失效"),
    NO_SCHEME(10039, "未查询到方案"),
    NO_PLAN(10030, "未查到有效的调节方案"),

    ENTERPRISE_EXIST(20001,"企业已经存在"),
    ENTERPRISE_NOT_EXIST(20002,"企业不存在"),
    ENTERPRISE_ADD_ERROR(20003,"企业添加发生错误"),

    FILE_NOT_NULL(30001,"文件不能为空"),
    FILE_TOO_BIG(30002,"文件太大，单文件不得超过10M"),

    PERMISSION_ALLOCATION_ERROR(40001, "权限分配失败"),
    PERMISSION_NOT_ALLOCATION(40002, "暂无权限，请联系相关管理人员分配权限！"),

    POSITION_NULL(50001, "省/市/区信息为空！"),

    DICTIONARY_NULL(50001, "字典信息为空！"),

    COUPON_NOT_FOUND(60001,"优惠券未找到"),
    COUPON_BE_OVERDUE(60002,"优惠券未找到"),
    COUPON_BE_USED(60003,"优惠券已使用"),

    ORDER_REFUND_ERR(70000,"订单退订出错，请联系管理员"),
    ORDER_PAYMENT_ERR(70001,"订单付款出错，请联系管理员"),
    ;
    private Integer code;
    private String msg;

    ResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

}
